
var __scripts = new Array('version', 'consts', 'userconsts', 'bowser', 'common', 'clipboard', 'form', 'tree', 'edit',
'enumpicker', 'button', 'tabfolder', 'label', 'dataset', 'application', 'grid', 'image', 'scrollbox',
'calendar', 'checkbox', 'tscheckbox', 'setpicker', 'toolbar', 'projection', 'chart', 'filterDialog', 'sortDialog', 
'findDialog', 'messageDialog', 'reportDialog', 'quickFilterDialog', 'passwordChangeDialog', 'checkgroup', 'radiogroup',
'resizer', 'contextMenu', 'specialForms', 'RichTextWrapper', 'dragDrop', 'user');

var __scriptCounter = 0;

function loadNextScript()
{
}

function __loadScripts()
{
	for (var cnt = 0; cnt < __scripts.length; cnt++)
	{
		if ((typeof(appQIScriptVersion) == 'undefined') || (appQIScriptVersion == null))
			document.write('<scr' + 'ipt language="javascript" src="./scripts/new/' + __scripts[cnt] + '.js?rnd=' + (Math.floor(Math.random() * 10000)).toString() + '" type="text/javascript"></scr' + 'ipt>');
		else
			document.write('<scr' + 'ipt language="javascript" src="./scripts/new/' + __scripts[cnt] + '.js?rnd=' + appQIScriptVersion + '" type="text/javascript"></scr' + 'ipt>');
	}
}

function __loadNextScript()
{

 	if (__scriptCounter >= __scripts.length)
 		return;

	var xmlHttpReq = null;
	var scriptName = __scripts[__scriptCounter++]

	if (window.XMLHttpRequest)
	{
		xmlHttpReq = new XMLHttpRequest();
	}
	else
	if (window.ActiveXObject)
	{
		try
		{
			xmlHttpReq = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {}
		}
	}

	xmlHttpReq.onreadystatechange = function()
	{
		if (xmlHttpReq.readyState == 4)
		{
			try
			{
				if (xmlHttpReq.status < 400)
				{
					if (window.execScript)
						window.execScript(xmlHttpReq.responseText, 'javascript');
        			else 
        			if (window.eval)
        				window.eval(xmlHttpReq.responseText);
				}
			}
			catch (e)
			{}

//			xmlHttpReq.onreadystatechange = null;
			xmlHttpReq = null;
			window.setTimeout("__loadNextScript()", 1);
		}
	}

	try
	{
		xmlHttpReq.open("GET", './scripts/new/' + scriptName + '.js', true);
		xmlHttpReq.send(null);
	}
	catch (e)
	{
	}  

}

//__loadNextScript();
__loadScripts();
